package com.example.common.enums;

import com.example.common.util.RunnerMonitor;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * <p>
 *
 * </p>
 *
 * @author Yi
 * @version v1.0.0
 * @date 2019-08-15 23:56
 * @modificationHistory=========================逻辑或功能性重大变更记录
 * @modify By: {修改人} 2019-08-15
 * @modify reason: {方法名}:{原因}
 * ...
 */
@AllArgsConstructor
@Getter
public enum BasePathEnum {

    /*不同环境常用路径配置*/
    BASE_PATH_ENUM_PROJECT_PATH_MAC("/Users/Yi/Ashe/workspace/architectrue-adventure/"),

    BASE_PATH_ENUM_PROJECT_PATH_WINDOWS_10("E:/workspace/architectrue-adventure/20190814/architectrue-adventure/"),

    BASE_PATH_ENUM_USER_PATH_MAC("/Users/Yi/Desktop/Temp/"),

    BASE_PATH_ENUM_USER_PATH_WINDOWS_10("C:/Users/xiachaoyang/Desktop/");

    private String path;

    public static String getProjectPath() {
        String path = "";
        switch (RunnerMonitor.getOSType()) {
            case OS_NAME_MAC:
                path = BASE_PATH_ENUM_PROJECT_PATH_MAC.getPath();
                break;
            case OS_NAME_LINUX:
                break;
            case OS_NAME_WINDOWS_10:
                path = BASE_PATH_ENUM_PROJECT_PATH_WINDOWS_10.getPath();
                        break;
            default:
                break;
        }
        return path;
    }

    public static String getUserPath() {
        String path = "";
        switch (RunnerMonitor.getOSType()) {
            case OS_NAME_MAC:
                path = BASE_PATH_ENUM_USER_PATH_MAC.getPath();
                break;
            case OS_NAME_LINUX:
                break;
            case OS_NAME_WINDOWS_10:
                path = BASE_PATH_ENUM_USER_PATH_WINDOWS_10.getPath();
                break;
            default:
                break;
        }
        return path;
    }
}
